<template>
  <el-descriptions direction="vertical" :column="2" border>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['companyLogo-change'] ? 'change' : ''"
          >企业LOGO</span
        >
      </template>
      <el-image
        style="height: 80px"
        :src="item.companyLogo"
        :preview-src-list="[item.companyLogo]"
      >
      </el-image>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span>入驻身份</span>
      </template>
      {{ item.userItemTypeTxt }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['companyName-change'] ? 'change' : ''"
          >企业名称</span
        >
      </template>
      {{ item.companyName }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['companyNo-change'] ? 'change' : ''">信用代码</span>
      </template>
      {{ item.companyNo }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['email-change'] ? 'change' : ''">企业邮箱</span>
      </template>
      {{ item.email }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['companyType-change'] ? 'change' : ''"
          >企业类型</span
        >
      </template>
      {{ item.companyTypeTxt }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['contactName-change'] ? 'change' : ''"
          >联系人姓名</span
        >
      </template>
      {{ item.contactName }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['contactTel-change'] ? 'change' : ''"
          >联系人手机号</span
        >
      </template>
      {{ item.contactTel }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['buildTime-change'] ? 'change' : ''">成立时间</span>
      </template>
      {{ item.buildTime }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['businessTerm-change'] ? 'change' : ''"
          >营业期限</span
        >
      </template>
      {{ item.businessTerm }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['businessProduct-change'] ? 'change' : ''"
          >主营产品</span
        >
      </template>
      {{ item.businessProduct }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['registerMoney-change'] ? 'change' : ''"
          >注册资本</span
        >
      </template>
      {{ item.registerMoney }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['legalName-change'] ? 'change' : ''">法人姓名</span>
      </template>
      {{ item.legalName }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['legalNo-change'] ? 'change' : ''"
          >法人身份证号</span
        >
      </template>
      {{ item.legalNo }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['legalNoImg-change'] ? 'change' : ''"
          >法人身份证(正面)</span
        >
      </template>
      <el-image
        style="height: 80px"
        v-if="item.legalNoImg"
        :src="item.legalNoImg.split(',')[0]"
        :preview-src-list="item.legalNoImg.split(',')"
      >
      </el-image>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['legalNoImg-change'] ? 'change' : ''"
          >法人身份证(反面)
        </span>
      </template>
      <el-image
        style="height: 80px"
        v-if="item.legalNoImg"
        :src="item.legalNoImg.split(',')[1]"
        :preview-src-list="item.legalNoImg.split(',')"
      >
      </el-image>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['businessImg-change'] ? 'change' : ''"
          >营业执照</span
        >
      </template>
      <el-image
        style="height: 80px"
        v-if="item.businessImg"
        :src="item.businessImg"
        :preview-src-list="[item.businessImg]"
      >
      </el-image>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['bankCardImg-change'] ? 'change' : ''"
          >开户许可证</span
        >
      </template>
      <el-image
        style="height: 80px"
        v-if="item.bankCardImg"
        :src="item.bankCardImg"
        :preview-src-list="[item.bankCardImg]"
      >
      </el-image>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['registerCityAddress-change'] ? 'change' : ''"
          >注册地址</span
        >
      </template>
      {{ item.registerCityAddressTxt }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <span :class="item['registerStreetAddress-change'] ? 'change' : ''"
          >详细地址</span
        >
      </template>
      {{ item.registerStreetAddress }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label" :span="2">
        <span :class="item['businessScope-change'] ? 'change' : ''"
          >经营范围</span
        >
      </template>
      {{ item.businessScope }}
    </el-descriptions-item>
  </el-descriptions>
</template>

<script>
export default {
  props: {
    item: {
      type: Object,
      default: () => {
        return {}
      },
    },
  },
}
</script>
<style scoped>
.change {
  color: #f46262;
}
</style>
